<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/20
 * Time: 9:03
 */

namespace app\index\controller;


use think\Controller;

class Order extends Controller {
    public function index($status="") {
        //数据模拟
        $text = "";
        switch ($status) {
            case '':
                $text = "已取消";
                break;
            case '1':
                $text = "待付款";
                break;
            case '2':
                $text = "待发货";
                break;
            case '3':
                $text = "已发货";
                break;
            case '4':
                $text = "已完成确认收货";
                break;
            case '5':
                $text = "已取消";
                break;
        }
        return $this->fetch('order',['status'=>$status,'text'=>$text]);
    }
    public function detail() {
        return $this->fetch('order-detail');
    }
    public function address($op='') {
        return $this->fetch('order-deliver',['op'=>$op]);
    }
    public function evaluate($op='') {
        return $this->fetch('order-evaluate',['op'=>$op]);
    }
    public function freight($op='') {
        return $this->fetch('order-freight',['op'=>$op]);
    }
}